package com.xiyu.service.vo.customer.customer;

import com.xiyu.service.vo.customer.info.baseVO.CustomerInfoBase;
import com.xiyu.service.vo.customer.contact.baseVO.CustomerContactBase;
import com.xiyu.service.vo.infra.data.baseVO.DictCountryBase;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;

import jakarta.validation.Valid;
import com.xiyu.service.enums.common.CommonStatusEnum;
import com.xiyu.service.framework.validation.InEnum;
import org.springframework.format.annotation.DateTimeFormat;
    import static com.xiyu.service.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
    import java.time.LocalDateTime;

@Schema(description = "分页查询客户")
@Data
@AllArgsConstructor
public class CustomerPageQueryOutput extends CustomerInfoBase {

    @Schema(description = "字典-国家")
    @Valid
    private country country;

    @Schema(description = "部门表")
    @Valid
    private dept dept;

    @Schema(description = "用户信息表")
    @Valid
    private user owner;

    @Schema(description = "更新时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime updateTime;

    @Schema(description = "客户信息主键ID")
    private Long id;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime createTime;

    @Schema(description = "客户联系人")
    @Valid
    private contact mainContact;

    @Schema(description = "客户图片")
    @Valid
    private List<image> images;

    @Schema(description = "客户图片")
    @Data
    public static class image {

        @Schema(description = "图片路径")
        private String url;
    }

    @Schema(description = "用户信息表")
    @Data
    public static class user {

        @Schema(description = "用户昵称", example = "芋艿")
        private String nickname;
    }

    @Schema(description = "字典-国家")
    @Data
    public static class country extends DictCountryBase {
    }

    @Schema(description = "客户联系人")
    @Data
    public static class contact extends CustomerContactBase {
    }

    @Schema(description = "部门表")
    @Data
    public static class dept {

        @Schema(description = "部门名称", example = "芋道")
        private String name;
    }
}